﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Master/List.Master" AutoEventWireup="true" CodeBehind="UserRole.aspx.cs" Inherits="DevFx.Web.Pages.Rights.UserRole" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHeader" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            gridview("<%=gvList.ClientID %>");
            $("#<%=gvList.ClientID %>").mouseover(function () {
                $(this).css("cursor", "hand");
            });
        });
        function show(id, flag) {
            showUnWindowDialog("UserEdit.aspx?id=" + id + "&&func=refresh&&flag=" + flag, 600, 350);
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="tb" align="center">
  <tr>
            <td colspan="4" class="title">
                人员-角色列表维护
            </td>
        </tr>
        <tr>
            <td class="alt">
               人员名称：
            </td>
            <td>
                <asp:Label runat="server" ID="lblName"></asp:Label>
            </td>
            <td class="alt">
                角色列表：
            </td>
            <td>
                <asp:DropDownList ID="ddlRoleList" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
    </table>
    <div class="bottombtn">
      <asp:Button runat="server" ID="btnSave" Text="添加"   CssClass="btn" 
                    onclick="btnAdd_Click"/>
                    <asp:Button runat="server" ID="btnDel" Text="删除"  CssClass="btn"
                    onclick="btndel_Click"/>
    </div>
 <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" 
        CssClass="gv" AllowSorting="True"
        BorderStyle="None" onsorting="gvList_Sorting" 
        onrowcommand="gvList_RowCommand">
        <Columns >
             <asp:TemplateField >
                <ItemTemplate>
                    <asp:CheckBox ID="cbx1" runat="server" />
                </ItemTemplate>
                <HeaderTemplate>
                    <asp:CheckBox ID="cbx1" runat="server" />
                </HeaderTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="UserName" HeaderText="人员名称" SortExpression="UserID" />
            <asp:BoundField DataField="RoleName" HeaderText="角色名称" SortExpression="RoleID" />
           <asp:TemplateField HeaderText="">
                <ItemTemplate>
                     <img  src="../../Contents/images/delete.gif" height="13" width="13"/>
                    <asp:LinkButton runat="server"  CommandArgument='<%#Eval("UserRoleID") %>' CommandName="Del"  ID="btndel"  OnClientClick='return confirm("您确认删除吗？","删除"); ' Text="删除"></asp:LinkButton>
                    <asp:HiddenField  runat="server" ID="hfID" Value='<%#Eval("UserRoleID") %>'/>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
   
</asp:Content>